/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.discount.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 品牌Entity
 * @author czp
 * @version 2018-07-08
 */
@Table(name="discount_brand", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="brand_name", attrName="brandName", label="品牌名", queryType=QueryType.LIKE),
		@Column(name="brand_type_id", attrName="brandTypeId", label="品牌类型"),
		@Column(name="brand_logo_path", attrName="brandLogoPath", label="品牌logo"),
		@Column(name="intro", attrName="intro", label="说明"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class DiscountBrand extends DataEntity<DiscountBrand> {
	
	private static final long serialVersionUID = 1L;
	private String brandName;		// 品牌名
	private String brandTypeId;		// 品牌类型
	private String brandLogoPath;		// 品牌logo
	private String intro;		// 说明
	
	public DiscountBrand() {
		this(null);
	}

	public DiscountBrand(String id){
		super(id);
	}
	
	@NotBlank(message="品牌名不能为空")
	@Length(min=0, max=64, message="品牌名长度不能超过 64 个字符")
	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}
	
	@NotBlank(message="品牌类型不能为空")
	@Length(min=0, max=64, message="品牌类型长度不能超过 64 个字符")
	public String getBrandTypeId() {
		return brandTypeId;
	}

	public void setBrandTypeId(String brandTypeId) {
		this.brandTypeId = brandTypeId;
	}
	
	@NotBlank(message="品牌logo不能为空")
	@Length(min=0, max=255, message="品牌logo长度不能超过 255 个字符")
	public String getBrandLogoPath() {
		return brandLogoPath;
	}

	public void setBrandLogoPath(String brandLogoPath) {
		this.brandLogoPath = brandLogoPath;
	}
	
	@Length(min=0, max=255, message="说明长度不能超过 255 个字符")
	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}
	
}